<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page session="false"%>
<html>
<head>
<title>ModernWebshop Client</title>
	<style type="text/css">
		<%@ include file="/resources/css/styles.css"%>
    </style>
</head>
<body>

	<div class="wrapper">
		<div class="left">
		
			<div class="teaser">
				<h1>ModernWebstore</h1>
				<h3>Verify your basket and pay</h3>
			</div>
		    
		    <div class="teaser">
				<h2>Navigation</h2>
				<a href="home" class="more">Go to store</a>
			    <c:if test="${not empty items}">
			    	<a href="payment" class="more">Go to payment</a>
			    </c:if>
		    </div>
		    
		    <c:if test="${empty items}">
		    	<div class="item-${loop.count} teaser">
			    	<h2>No items in your basket</h2>
				</div>
		    </c:if>
		    
			<c:forEach var="item" items="${items}" varStatus="loop">
	            <div class="item-${loop.count} teaser">
	            	<img class="icon" src="${item.imageUrl}" />
	                <h2>${amount.get(item.id)} ${item.name}(s) in basket $${item.price}</h2>
	                <p>${item.description}</p>
	                <a href="basket/sub/${item.id}" class="more">Reduce</a>
		            <a href="basket/add/${item.id}" class="more">Add</a>
	                <a href="basket/rem/${item.id}" class="more">Remove</a>
	            </div>
            </c:forEach>
			
		</div>
	</div>
	
</body>
</html>
